package com.ruoyi.common.mongo.domain.po;

import com.ruoyi.common.enums.BaseIsDeletedEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class MongoBasePO {
    @Field("_id")
    @Indexed
    private ObjectId id;
    @Field("gmt_create")
    private Date gmtCreate;
    @Field("gmt_modified")
    private Date gmtModified;
    @Field("create_id")
    private Long createId;
    @Field("modified_id")
    private Long modifiedId;
    /**
     * 0.存在。1.删除
     */
    @Field("is_deleted")
    private BaseIsDeletedEnum isDeleted;
}
